const path = require('path');
const express = require('express');

let app = express();

//构建
const GradeRouter = express.Router();

//引入控制器
const GradeController = require(path.join(__dirname,"../controllers/GradeController"));

//班级列表页面
GradeRouter.get('/gradeList',GradeController.gradeList);

//班级添加页面
GradeRouter.get('/gradeAdd',GradeController.gradeAdd);

//班级添加post处理
GradeRouter.post('/gradeAdd',GradeController.gradeAddForm);

//班级编辑页面
GradeRouter.get('/gradeEdit',GradeController.gradeEdit);

//班级编辑post处理
GradeRouter.post('/gradeEdit',GradeController.gradeEditForm);

//班级删除
GradeRouter.get('/gradeDelete',GradeController.gradeDelete);

module.exports = GradeRouter;